Skip to content

Conversation

flip1995
Copy link
Member

The ICE is produced by building this span:

let last_segment = last_segment.unwrap_or_else(|| path.segments.last().expect(SEGMENTS_MSG));
// Path segments only include actual path, no methods or fields.
let last_path_span = last_segment.ident.span;
// Only take path up to the end of last_path_span.
let span = path.span.with_hi(last_path_span.hi());

span can start in the file the macro is defined in and end where the macro is called.

changelog: Fix ICE in use_self lint

@flip1995 flip1995 changed the title Add regression test for ICE in use-self lint WIP: Add regression test for ICE in use-self lint Oct 15, 2019
@flip1995 flip1995 changed the title WIP: Add regression test for ICE in use-self lint WIP: Fix ICE in use_self lint Oct 15, 2019
@flip1995 flip1995 added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 15, 2019
@flip1995 flip1995 changed the title WIP: Fix ICE in use_self lint Fix ICE in use_self lint Oct 15, 2019
@flip1995
Copy link
Member Author

@bors try

bors added a commit that referenced this pull request Oct 15, 2019
Fix ICE in `use_self` lint

The ICE is produced by building this span:
https://github.com/rust-lang/rust-clippy/blob/55e7818a06c8d83bead9c81e10e73ba33fb20890/clippy_lints/src/use_self.rs#L55-L60

`span` can start in the file the macro is defined in and end where the macro is called.

changelog: Fix ICE in `use_self` lint
@bors
Copy link
Contributor

bors commented Oct 15, 2019

⌛ Trying commit 2f10807 with merge 8025c14...

@flip1995
Copy link
Member Author

Let's see, if we can enable the currently disabled integration tests (2f10807)

@bors
Copy link
Contributor

bors commented Oct 15, 2019

☀️ Try build successful - checks-travis, status-appveyor
Build commit: 8025c14 (8025c149578eee3aece62ad045bfa03d1c102c39)

@phansch
Copy link
Contributor

phansch commented Oct 15, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Oct 15, 2019

📌 Commit 2f10807 has been approved by phansch

@bors
Copy link
Contributor

bors commented Oct 15, 2019

⌛ Testing commit 2f10807 with merge 778ace3...

bors added a commit that referenced this pull request Oct 15, 2019
Fix ICE in `use_self` lint

The ICE is produced by building this span:
https://github.com/rust-lang/rust-clippy/blob/55e7818a06c8d83bead9c81e10e73ba33fb20890/clippy_lints/src/use_self.rs#L55-L60

`span` can start in the file the macro is defined in and end where the macro is called.

changelog: Fix ICE in `use_self` lint
@bors
Copy link
Contributor

bors commented Oct 15, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: phansch
Pushing 778ace3 to master...

@bors bors merged commit 2f10807 into rust-lang:master Oct 15, 2019
@flip1995 flip1995 deleted the ice-4671 branch October 16, 2019 07:09
@flip1995 flip1995 mentioned this pull request Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants